#ifndef UTILITY_H
#define UTILITY_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdint.h>
#include <assert.h>

#define WORD_NUMS 200

#ifndef FILE_LINES
#define FILE_LINES 30
#endif

#ifndef LINE_NUMBERS 
#define LINE_NUMBERS 30
#endif

typedef struct {
    size_t line_nums;
    char * src[FILE_LINES];
} FILE_SRC_INFO;

extern FILE_SRC_INFO * source;
extern int INITIALIZATION;


/* 
    Init File Content Structure Pointer
    Only Call Once
*/
void Init();

/* 
    Read file content
*/
void ReadFile(const char * fileName);

/* Write File content */
void SaveFile(const char * fileName, const void * content);

/* Relese memory */
void Release();

#endif

